RBVersion Constant

Reports the major and minor version number of REALbasic.

result=RBVersion

PartTypeDescription
result Double Constant indicating major and minor version number.


Example

The following line displays the version of REALbasic that is running.

MsgBox "You're running version "+ Str(RBVersion)+" of REALbasic!"

Note

Version 2005 returns a number of the form 2005.xx, where xx is the Release number.

When you build your application, you can enter version information about your application in the App class's Properties pane. This information is stored in your application's 'vers' resource. For more information, see the chapter on building applications in the User's Guide.

You can use RBVersion in an #If statement to determine whether a use is running a particular version of REALbasic. Based on the result, you conditionally compile code that is available only for that version.


Example

The following includes code only for applications built using REALbasic version 5 or above.

#If RBVersion>5
 //include 5.0 code here
#endif

See Also

DebugBuild, RBVersionString, TargetBigEndian, TargetCarbon, TargetHasGUI, TargetLinux, TargetLittleEndian, TargetMachO, TargetMacOS, TargetMacOSClassic, TargetWin32 constants; #If statement.